﻿using System;
using System.Collections;
using Huirui.Cavan.Domain.Seedwork;

namespace Huirui.Cavan.Domain.MainBoundedContext.SystemModule
{
    #region SupplierType

    /// <summary>
    /// SupplierType object for NHibernate mapped table 'SupplierType'.
    /// </summary>
    public class SupplierType : Persistent
    {
        #region Member Variables

        protected string _name;

        #endregion

        #region Constructors

        public SupplierType() { }

        public SupplierType(string name, DateTime createDate, DateTime modifyDate, int editUser, byte[] version)
        {
            this._name = name;
            this._createDate = createDate;
            this._modifyDate = modifyDate;
            this._editUser = editUser;
            this._version = version;
        }

        #endregion

        #region Public Properties

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (value != null && value.Length > 100)
                    throw new ArgumentOutOfRangeException("Invalid value for Name", value, value.ToString());
                _name = value;
            }
        }


        #endregion
    }
    #endregion
}